#include "logeventwarp.h"

namespace vlog
{

// 析构的时候调用 logger -> logappedner -> logformatter -> message

LogEventWarp::~LogEventWarp()
{
    if (m_pLogEvent && m_logger)
    {
        m_logger->WriteLog(m_pLogEvent);
    }
}

LogEventWarp::LogEventWarp(Logger::ptr logger, event::LogEvent::ptr plogEvent)
    : m_logger(logger), m_pLogEvent(plogEvent)
{
}

} // namespace vlog
